package com.example.cpu100demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chaird
 * @create 2020-12-25 21:28
 */
@SpringBootApplication
@RestController
public class App {

  @Autowired
  private Cpu100Service cpu100Service;

  public static void main(String[] args) {
    SpringApplication.run(App.class, args);
  }

  @GetMapping("/cpu100")
  public Object getWhileList() {
    cpu100Service.cpu100();
    return 1;
  }

  @GetMapping("/thread20")
  public Object thread20() {
    cpu100Service.thread20();
    return 1;
  }
}
